<%@ Control Language="C#" AutoEventWireup="true" Inherits="NopSolutions.NopCommerce.Web.Administration.Modules.DiscountsControl"
    CodeBehind="Discounts.ascx.cs" %>
<div class="section-header">
    <div class="title">
        <img src="Common/ico-promotions.png" alt="Discounts" />
        Manage Discounts
    </div>
    <div class="options">
        <input type="button" onclick="location.href='DiscountAdd.aspx'" value="Add new" id="btnAddNew"
            class="adminButtonBlue" title="Add a new sales discount" />
    </div>
</div>
<asp:GridView ID="gvDiscounts" runat="server" AutoGenerateColumns="False" Width="100%">
    <Columns>
        <asp:BoundField DataField="DiscountID" HeaderText="DiscountID" Visible="False"></asp:BoundField>
        <asp:TemplateField HeaderText="Name" ItemStyle-Width="20%">
            <ItemTemplate>
                <a href="DiscountDetails.aspx?DiscountID=<%#Eval("DiscountID")%>" title="Edit discount">
                    <%#Server.HtmlEncode(Eval("Name").ToString())%>
                </a>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:BoundField DataField="UsePercentage" HeaderText="Use percentage" HeaderStyle-HorizontalAlign="Center"
            ItemStyle-Width="13%" ItemStyle-HorizontalAlign="Center"></asp:BoundField>
        <asp:BoundField DataField="DiscountPercentage" HeaderText="Discount percentage" HeaderStyle-HorizontalAlign="Center"
            ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Center"></asp:BoundField>
        <asp:BoundField DataField="DiscountAmount" HeaderText="Discount amount" HeaderStyle-HorizontalAlign="Center"
            ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Center"></asp:BoundField>
        <asp:BoundField DataField="StartDate" HeaderText="Start date" HeaderStyle-HorizontalAlign="Center"
            ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Center"></asp:BoundField>
        <asp:BoundField DataField="EndDate" HeaderText="End date" HeaderStyle-HorizontalAlign="Center"
            ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Center"></asp:BoundField>
        <asp:TemplateField HeaderText="Edit" HeaderStyle-HorizontalAlign="Center" ItemStyle-Width="10%"
            ItemStyle-HorizontalAlign="Center">
            <ItemTemplate>
                <a href="DiscountDetails.aspx?DiscountID=<%#Eval("DiscountID")%>" title="Edit discount">
                    Edit</a>
            </ItemTemplate>
        </asp:TemplateField>
    </Columns>
</asp:GridView>
